
<?
	 layout("/inc/win_layout.html",{title:sysTitle}){
    ?>
<div class="panel ">
	<div class="panel-body pan" style="height: 495px">
		<form action="#" class="form-horizontal">
			<div class="form-body pal">
				<div class="row" style="margin-top:-15px; margin-bottom: 10px;">
					<div class="col-lg-6"
						style="width: 400px; float:left;  margin-right:-20px; display:inline;">
						<label for="inputUsername" class="col-md-3 control-label">用户名
							<span class='require' id="yonghu">*</span> </label>
						<div class="col-md-9">
							<div class="input-icon">
								<input id="username" onchange="onPanduan(this.value);"
									type="text" class="form-control" value="" />
							</div>
						</div>
					</div>
					<div class="col-lg-6"
						style="width: 400px; float:right; display:inline;">
						<label for="inputUsername" class="col-md-3 control-label">昵称
							<span class='require' id="yonghu">*</span> </label>
						<div class="col-md-9">
							<div class="input-icon">
								<input id="nickname"type="text" class="form-control" value="" disabled="true" />
							</div>
						</div>
					</div>
				</div>
				<div class="row" style="margin-bottom: 10px;">
					<div class="col-lg-6"
						style="width: 400px; float:left; margin-right:-20px; display:inline;">
						<label for="inputUsername" class="col-md-3 control-label">地址
							<span class='require' id="yonghu">*</span> </label>
						<div class="col-md-9">
							<div class="input-icon">
								<input id="address"
									type="text" class="form-control" value="" disabled="true"/>
							</div>
						</div>
					</div>
					<div class="col-lg-6"
						style="width: 400px; float:right; display:inline;">
						<label for="inputUsername" class="col-md-3 control-label">手机号
							<span class='require' >*</span> </label>
						<div class="col-md-9">
							<div class="input-icon">
								<input id="telephone" type="text" class="form-control" disabled="true" />
							</div>
						</div>
					</div>
				</div>
				<div class="row" style="margin-bottom: 10px;">
					<div class="col-lg-6"
						style="width: 400px; float:right; display:inline;">
						<label for="inputUsername" class="col-md-3 control-label">邮箱
							<span class='require'>*</span> </label>
						<div class="col-md-9">
							<div class="input-icon">
								<input id="email" type="text" class="form-control" disabled="true"/>
							</div>
						</div>
					</div>
					<div class="col-lg-6"
						style="width: 400px; float:left; margin-right:-20px; display:inline;">
						<label for="inputUsername" class="col-md-3 control-label">创建日期
							<span class='require'>*</span> </label>
						<div class="col-md-9">
							<div class="input-icon">
								<input id="createTime" disabled="disabled" type="text" class="form-control"  />
							</div>
						</div>
					</div>
				</div> 	
				<div class="row" style="margin-bottom: 10px;">
						<div class="col-lg-6"
						style="width: 400px; float:left; margin-right:-20px; display:inline;">
						<label for="inputUsername" class="col-md-3 control-label">部门名称<span
						class='require'>*</span> </label>
						<div class="col-md-9">
							<div class="input-icon">
								<input id="parentclassname" type="text" class="form-control" disabled="true" /> 
								<input id="parentClassid" type="hidden" class="form-control" />
							</div>
						</div>
					</div>
					<div class="col-lg-6"
						style="width: 400px; float:right; display:inline;">
						<label for="inputUsername" class="col-md-3 control-label">用户组名称<span
						class='require'>*</span> </label>
						<div class="col-md-9">
							<div class="input-icon">
								<input id="userGroupName" type="text" class="form-control" disabled="true" /> 
								<input id="userGroupId" type="hidden"  class="form-control" />
							</div>
						</div>
					</div>
				</div> 
				<div>
					<label for="inputUsername" class="col-md-3 control-label">个性签名
						<span class='require'></span> </label>
					<div class="col-md-12">
						<div class="input-icon">
							<textarea id="signature"  rows="3" cols="20" class="form-control" disabled="true"></textarea> 
						</div>
					</div>
				</div>
				<input id="id" type="hidden" class="form-control" />
		</form>
	</div>
</div>

<?} ?>

<script>
	var index1 = window.parent.getUserId();
	$(function() {
		if (index1 != 0) {
			$("#username").attr("disabled", "true");
			$("#mima").html("");
			demo1();
		} else {
			newdate();
		}
	});
	
	function save() {
				var index = parent.layer.getFrameIndex(window.name);
				parent.layer.close(index);
			}
	function demo1() {
		$.getJSON('./userfindone.do', {
			id : index1
		//向服务端传的参数，此处只是演示
		}, function(res) {
			//此处仅仅是为了演示变化的内容
			$("#username").val(res[0].username);
			$("#nickname").val(res[0].nickname);
			$("#telephone").val(res[0].telephone);
			$("#address").val(res[0].address);
			$("#email").val(res[0].email);
			$("#parentclassname").val(res[0].departmentName);
			$("#parentClassid").val(res[0].departmentId);
			$("#createTime").val(res[0].createTime);
			$("#signature").val(res[0].signature);
			$("#userGroupName").val(res[0].userGroupName);
			$("#userGroupId").val(res[0].userGroupId);
		});
	};
	function newdate() {
		$.getJSON('./newDate.do', {},
				function(res) {
					$("#createTime").val(res.date);
				});
	}
</script>


